
create table customer(id number primary key,name varchar2(20),sal number(10,2),birth Date,sex char,CONSTRAINT customer_name UNIQUE (name));
create sequence seq_customer_01 start with 1 increment by 1;
select * from customer;
select * from hobby;
create table hobby(id number primary key,name_id number,fav varchar2(20));
create sequence seq_hobby_01 start with 1 increment by 1;

alter table hobby
add constraint fk_name_id foreign key (name_id) 
references customer (id) on delete cascade;

insert into customer(id,name) values (seq_customer_01.nextval,'wyatt2');

drop table customer;
drop sequence seq_customer_01;
drop table hobby;
drop sequence seq_hobby_01;